// Get the client
const mysql = require('mysql2');

// Create the connection to database
// const connection = mysql.createConnection({
//   host: '49.233.206.76',
//   user: 'root',
//   database: 'mydb',
//   password:'root',
// });

// Create the connection pool. The pool-specific settings are the defaults
const connection = mysql.createPool({
  host: '101.34.67.25',
  user: 'root',
  database: 'mydb',
  password:'root',
  waitForConnections: true,
  connectionLimit: 10,
  maxIdle: 10, // max idle connections, the default value is the same as `connectionLimit`
  idleTimeout: 60000, // idle connections timeout, in milliseconds, the default value 60000
  queueLimit: 0,
  enableKeepAlive: true,
  keepAliveInitialDelay: 0,
});



module.exports={connection}
